Image processing apparatus, image processing method, and non-transitory computer-readable storage medium

ABSTRACT

An image processing apparatus sets a first detection area as a detection area for detecting a predetermined object in a first image, modifies the first detection area based on a size of the first image and a size of the second image different from the size of the first image to set a second detection area as the detection area in the second image, and detects the predetermined object in the second detection area.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an image processing apparatus, an imageprocessing method, and a non-transitory computer-readable storagemedium.

Description of the Related Art

In recent years, an image processing apparatus capable of performing adetection of people or the like in an image is used in varioussituations. Such an image processing apparatus is used in order tomeasure a number of spectators in a stadium or to measure a number ofvisitors of an amusement park for example. A targeted detection area maybe a whole image or may be a portion of an image when the imageprocessing apparatus detects the number of people or the like in animage. Accordingly, in an image processing apparatus, it is necessary toset a detection area in each image when detecting people or the like ina plurality of images, a video, or the like. For example, in JapanesePatent Laid-Open No. 2010-140425, a method in which a local area is setfor subsequent frames based on a search result in an initial frame isdisclosed as a method for setting a detection area in each image.

An image processing technique for easily and appropriately setting asize of a detection area in accordance with an image size in relation toa plurality of images of differing image sizes was necessary.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, there is provided animage processing apparatus, which comprises: a setting unit configuredto set a first detection area as a detection area for detecting apredetermined object in a first image; a modification unit configured tomodify the first detection area based on a size of the first image and asize of the second image different from the size of the first image toset a second detection area as the detection area in the second image;and a detection unit configured to detect the predetermined object inthe second detection area.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of a configuration of an image processingapparatus.

FIG. 2 illustrates an example of a hardware configuration of the imageprocessing apparatus.

FIG. 3 illustrates an example of a main window of the image processingapparatus.

FIG. 4 illustrates one example of a detection area setting window.

FIG. 5 is a flowchart illustrating one example of a process of the imageprocessing apparatus according to this embodiment.

FIG. 6 illustrates one example of an image and a detection area.

FIG. 7 illustrates one example of an image and a detection area beforemodification and after modification.

FIG. 8 illustrates a different example of an image and detection areabefore modification and after modification.

DESCRIPTION OF THE EMBODIMENTS

Below, with reference to the attached drawings, a detailed descriptionis given for the present invention based on an embodiment. Note thatconfigurations illustrated in the following embodiments are merelyexamples, and the present invention is not limited to the illustratedconfigurations.

FIG. 1 illustrates an example configuration of an image processingapparatus according to embodiments of the present invention. An imageprocessing apparatus 101 has a detection unit 102, a file input unit103, a file output unit 104, a display control unit 105, a setting unit106, and, an operation input unit 109. The setting unit 106 has an imageextraction unit 107, a detection area setting unit 108, and a detectionarea modification unit 110.

The detection unit 102 performs detection of predetermined targets suchas people (objects). The file input unit 103 inputs an image file 111.The file output unit 104 outputs a result file as a result of adetection by the detection unit 102. The display control unit 105performs various displays to a display device 208 (FIG. 2). The settingunit 106 performs detection area setting processing. Specifically, theimage extraction unit 107 extracts, from the image file 111 inputted bythe file input unit, an image (target image) made to be a target of thesetting of the detection area. The operation input unit 109 inputsoperation information of an input apparatus 207 by a user (FIG. 2). Thedetection area setting unit 108 sets the detection area in the targetimage in accordance with the operation information. The detection areamodification unit 110 performs processing for modification of thedetection area.

FIG. 2 illustrates an example of a hardware configuration of the imageprocessing apparatus 101. The image processing apparatus 101 has a CPU201, a ROM 202, a RAM 203, a hard disk drive (HDD) 204, a disk drive205, a network interface 206, the input apparatus 207, and the displaydevice 208. The network interface 206 is connected to a network 211. TheCPU 201 is a control apparatus controlling the image processingapparatus 101 overall. The ROM 202 stores programs for the CPU 201 tocontrol the image processing apparatus 101. Specifically, a programstored in the ROM 202 realizes functions of FIG. 1 and processing of theflowchart illustrated in FIG. 5 described later. A secondary storageapparatus may also be provided in place of the ROM 202. The RAM 203loads a program that the CPU 201 reads from the ROM 202 and is a memoryfor executing processing. Also, the RAM 203 is used as a storage areafor temporarily storing data that is a target of various processing as atemporary storage memory.

The following embodiment is a method of inputting an image file. As oneembodiment, the HDD 204 is capable of storing the image file 111 and theCPU 201 inputs the image file 111 from the HDD 204. Note, the HDD 204 isnot necessary in a case when the CPU 201 inputs the image file 111 fromthe disk drive 205 or the network interface 206.

Also, as a separate embodiment, the disk drive 205 reads the image file111 from a CD, a DVD, a blue ray disk, or a flexible disk, and the CPU201 inputs the image file 111 via the disk drive 205. Note, the diskdrive 205 is not necessary in a case when the CPU 201 inputs the imagefile 111 from the HDD 204 or the network interface 206.

Also, as an yet another embodiment, the CPU 201 inputs the image file111 via the network 211. The network interface 206 is not necessary in acase when the CPU 201 inputs the image file 111 from the HDD 204 or thedisk drive 205.

Note, configuration may also be taken such that the method of inputtingan image file is a combination of any of the above describedembodiments.

The display device 208 is a device such as a display. The inputapparatus 207 has a keyboard for numeric value input and a pointingdevice, mouse, touch panel, and the like for instructing a displayposition of the display area of the display device 208.

As described above, the hardware configuration of the image processingapparatus 101 has hardware configuration elements similar to hardwareconfiguration elements mounted to a generic PC (personal computer). Forthat reason, various realized functions in the image processingapparatus 101 can be implemented as software which operates on a PC. Theimage processing apparatus 101 can realize the functions of FIG. 1 andthe processing of the flowchart illustrated in FIG. 5 described later bythe CPU 201 executing a program.

Next, description will be given regarding processing of the imageprocessing apparatus 101 according to this embodiment with reference toFIG. 3 to FIG. 5. First, description will be given regarding FIG. 3 andFIG. 4 which are examples of screens displayed on the display device208.

FIG. 3 illustrates one example of a main window 301 that the displaycontrol unit 105 displays on the display device 208. The main window 301has an input folder selection button 302, a detection area settingwindow activation button 303, a detection area display area 304, and adetection start button 305.

FIG. 4 illustrates one example of a detection area setting window 401that the display control unit 105 displays on the display device 208. Ina detection area setting window 401, a target image 402, a detectionarea 403, an OK button 404, and a cancel button 405 are displayed.

Note, the main window 301 of FIG. 3 and the detection area settingwindow of FIG. 4 are capable of displaying on the display device 208 atthe same time.

Next, description is given regarding processing of the image processingapparatus 101 using FIG. 5 with reference to FIG. 3 and FIG. 4. FIG. 5is a flowchart illustrating one example of processing of the imageprocessing apparatus 101. The display control unit 105 firstly displaysthe main window 301 of FIG. 3 to the display device 208 when the imageprocessing apparatus 101 activates. In step S1000, processing whichregisters all image files included in a folder selected by a user on themain window 301 as targets for analysis is performed.

Specifically, the display control unit 105 firstly displays a folderselection dialog on the display screen of the display device 208 when aselection of the input folder selection button 302 by the user isdetected. A folder selection dialog, although not shown in FIG. 3, is awindow on which a list of folders that the user can select aredisplayed. Note, the input folder selection button 302 and the folderselection dialog are one example of the file input unit 103. When theuser selects one folder in the folder selection dialog, the file inputunit 103 registers all image files included in the selected folder astargets for analysis. Note, a method of registration of a plurality offiles registered as targets for analysis is not limited to this methodand may be another method. Also, a type of image file that is registeredmay be either of a still image file and a video file. A still image fileincludes at least one image and a video file is configured from imagesof a plurality of frames.

Next, in step S1001, the file input unit 103 selects a particular imagefile among a plurality of registered image files (image file 111) basedon a predetermined condition. The file input unit 103 inputs theselected image file 111 to the image processing apparatus 101 via theHDD 204, the disk drive 205, or the network interface 206. Here,although the predetermined condition is a condition by which the filewhich is positioned at the head is selected first in a case when filenames are sorted, for example, it may also be another condition.

Next, in step S1002, the display control unit 105 displays the detectionarea setting window 401 of FIG. 4 onto the display screen of the displaydevice 208 in accordance with a selection of the detection area settingwindow activation button 303 by the user. The detection area settingwindow 401 is a window which has the function of the detection areasetting unit 108.

Next, in step S1003, the image extraction unit 107 extracts from theimage file 111 a target image as an image targeted for setting thedetection area, and the display control unit 105 displays it onto thedisplay screen as the target image 402. A method of extraction of atarget image will be described below. The image extraction unit 107extracts one image from the image file 111 as an extracted image in acase in which the image file 111 is a still image file including onlyone image. The image extraction unit 107 extracts an image of a headframe of the image file (video file) 111 as the target image in a casewhen the image file 111 is a video file configured from images of aplurality of frames.

Next, in step S1004, the detection area setting unit 108 sets a size andposition of the detection area 403 in accordance with a frame operationon the target image 402 by the user. The operation input unit 109 inputsoperation information of the input apparatus 207 input by the user andthe detection area setting unit 108 sets the detection area 403 inaccordance with that operation information.

One example of a method of setting the detection area 403 will bedescribed below. Here, the input apparatus 207 is a mouse. The targetimage 402 of FIG. 4 is of a rectangular shape. The rectangular detectionarea 403 is displayed on the target image 402. The user drags the mouseon the target image 402 in order to draw the detection area 403 on thetarget image 402. A point that a user performs a mouse-down on thetarget image 402 becomes one vertex, a point that the user performs amouse-up on the target image 402 becomes another vertex, and the twovertices are paired vertices. When parallel lines extend on each side ofthe target image 402 from the two vertices, two intersection points canbe found. A rectangle joining the above four points is the detectionarea 403. The display control unit 105 displays the detection area 403on the target image 402 in accordance with a user operation.

Next, the detection area setting unit 108 closes the detection areasetting window 401 and sets the XY coordinates of the vertex of thetop-left of the detection area 403 and a width and a height as thedetection area when a selection of the OK button 404 by the user isdetected. The display control unit 105 displays the XY coordinates ofthe top-left vertex, the width, and the height of the detection area 403on the detection area display area 304. Note that here, although avertex of the top-left of the detection area 403 is used, one of theother three points may be used. In this way, the detection area settingunit 108 sets the detection area 403 on the target image 402.

The detection area setting unit 108 closes the detection area settingwindow 401 and does not set the detection area of a new XY coordinate orthe like when a selection of the cancel button 405 by the user isdetected.

Note, a method for setting the detection area 403 is not limited to theabove described method. Any of a variety of methods may be used such asa method of setting according to dragging or the like of a frameprepared in advance or a method of causing a parallel translation of theedges of the frame for example. Also, a shape of the detection area 403may be a shape other than a rectangle and may be a shape of a closedspace in which the detection unit 102 can detect people or the like.

Next, in step S1005, the detection area modification unit 110 performs amodification of the detection area with respect to an image file(specifically, an image file registered in step S1000) of the targetsfor analysis in accordance with a selection of the detection startbutton 305 by the user. Hereinafter, description is given of an exampleof a method for modification of a detection area. Note, an image size ofan image of a video and the like included in one image file is fixed,and an image size of an image included in another image file is assumedto be different.

[First Detection Area Modification Method]

Description is given of a method in which the detection area set in animage of an image file A is modified, and then setting of the detectionarea in an image of an image file B is performed as a method formodification of the first detection area. In FIG. 6, an image 601 in theimage file A and a detection area 602 set in step S1004 on the image 601are illustrated. Here, the width of the image 601 is WA and the heightis HA. Also, the coordinates of the detection area 602 are (X1, Y1), thewidth is W1, and the height is H1. Note, in FIGS. 6 and 7, the top-leftof images 601 and 701 are origin points.

The image file B is an image file registered in step S1000 and is animage file in which a setting of a detection area is not yet finished.FIG. 7 illustrates an image 701 of the image file B. Here, a width ofthe image 701 is WB and a height is HB, and a size of the image 701 isassumed to be smaller than the image 601. Coordinates of the detectionarea 602 before modification are (X1, Y1), the width is W1, and theheight is H1, and coordinates of a detection area 702 after modificationare (X1, Y1), the width is W2, and the height is H2.

The following relationship expressions are used in this method formodification.WB<X1+W1  (1)HB<Y1+H1  (2)

W2=WB−X1 and the width of the detection area which is modified when thecondition of (1) is satisfied.

W2=W1 and the width of the detection area is unchanged when thecondition of (1) is not satisfied.

H2=HB−Y1 and the height of the detection area is modified when thecondition of (2) is satisfied.

H2=H1 and the height of the detection area is unchanged when thecondition of (2) is not satisfied.

For FIG. 7, the conditions (1) and (2) are satisfied. Accordingly, thenew detection area after modification has the coordinates (X1, Y1), awidth of W2, and a height of H2. The new detection area is the detectionarea of the image 701 of the image file B. The new detection area issaved in the setting unit 106.

The first detection area modification method, in other words, includesthe following processing by the detection area modification unit 110.Specifically, the detection area modification unit 110 sets, as thedetection area 702, an area modified such that a portion of thedetection area 602 that sticks out from the image 701 is cropped fromthe detection area 602 in the case of arrangement in which the image 601(target image) in which the detection area 602 (the detection area setin step S1004) is arranged and the image 701 are superimposed aligningpredetermined vertices thereof. The image of the image file Bcorresponds to the top-left portion of the image of the image file A andmay be an image captured by a camera at an angle of view which partiallyoverlaps the image of the image file A. Note that in FIG. 7, althoughthe predetermined vertices are the top-left of the images, limitation isnot made to this.

[Second Detection Area Method for Modification]

A method in which a detection area set in an image of an image file A ismodified and a detection area in an image of an image file C which issmaller than the size of the image of the image file A is set isdescribed as a second detection area modification method. The image ofthe image file C is assumed to be an image captured by a camera at thesame angle of view as the image of the image file A. FIG. 6 illustratesthe image of the image file A and description is the same as above.Note, the top-left of an image 801 (the image 601, although not shown)is assumed to be the origin point in FIG. 8 as well.

The image file C is an image file registered in step S1000 and is animage file in which a setting of a detection area is not yet finished.FIG. 8 illustrates the image 801 of the image file C. Here, the width ofthe image 801 is WC and the height is HC. Coordinates of the detectionarea 602 before modification are (X1, Y1), the width is W1, and theheight is H1, and coordinates of a detection area 802 after modificationare (X3, Y3), the width is W3, and the height is H3.

In this method for modification, each value after modification, asfollows, is a ratio of the width of the image 601 of the image file Aand the width of the image 801 of the image file C, or a ratio of theheight of the image 601 of the image file A and the height of the image801 of the image file C.X3=X1×WC/WAY3=Y1×HC/HAW3=W1×WC/WAH3=H1×HC/HA

By this, the new detection area after modification has the coordinates(X3, Y3), a width of W3, and a height of H3. The new detection area isthe detection area of the image 801 of the image file C. The newdetection area is saved in the setting unit 106.

The second detection area modification method, in other words, includesthe following processing by the detection area modification unit 110.Specifically, the detection area modification unit 110 sets as thedetection area 802 the area obtained by modifying the detection area 602such that a relationship of a position and a size of the detection area602 in relation to the image 601 (target image) is the same in the image801. Specifically, this method for modification can be applied in a casewhen an angle of view of the image 601 and an angle of view of the image801 are the same.

Returning to FIG. 5, next, in step S1006, the detection unit 102performs detection of people (objects) in the image of the image filefor which the detection area was set. The area that the detection unit102 detected is the interior of a rectangle defined by an X coordinate,a Y coordinate, a width, and a height saved in the setting unit 106. Inthe present embodiment, although the targets to be detected are people(objects), other targets may be included if it is something else thatcan be detected from the image. For example, the targets may becharacters or symbols or the like. The detection unit 102 performsdetection on a plurality of images in a case in which the image file isa video file configured from images of a plurality of frames.

In the present embodiment, although the images of the image file thatthe detection unit 102 detects are assumed to be all images included inthe image file, it is not necessary that it be all of the images. Forexample, the detection target of the detection unit 102 may be any imageif it is an image within the image file such as an image of apredetermined play back time interval, an image of a predetermined frameinterval, a predetermined image, an end image, or a head image withinthe image file.

Next in step S1007, the file output unit 104 outputs a result file as aresult of a detection of people (objects) by the detection unit 102.Specifically, the file output unit 104 saves the result file to apredetermined output folder. Included in the result file is a list,described in which as metadata is a number detected for each image of adetection target, and images in which a mark is added for the detectedpeople (objects), for example.

One example of a result file is illustrated below. The file output unit104 generates, as a file, a still image on which a number of targetssuch as people or the like that were detected in a frame image of adetection target is superimposed. In a case when the image file is astill image, only one file is outputted. In a case when the image fileis a video, one file is outputted every one second of the video.

The file name is <image file name>_000000.jpg in a case of a stillimage. The image file name is sample_000000.jpg in a case of“sample.jpg”. Meanwhile, in a case of a video, the file name differs byframe rate (fps), a first frame is made to be <image filename>_000000.jpg, and a value for which the frame rate number is addedto the frames processed in a one second interval is entered into thefile name. The start frame is data_000000.jpg when the image file nameis “data.avi” and subsequent frames are as in the following example.

In a case of 30 fps: data_000000.jpg, data_000030.jpg, data_000060.jpg .. .

In a case of 5 fps: data_000000.jpg, data_000005.jpg, data_000010.jpg .. .

Next, in step S1008, it is determined whether analysis of all imagefiles targeted for analysis selected in step S1000 has completed. If theresult of the determination is that there is an incomplete image file(if NO in step S1008), the image processing apparatus 101 makes thatimage file the target, returns processing to step S1005, and performsthe same processing. In step S1008, if analysis of all files hascompleted (if YES in step S1008), the processing finishes.

In this way, by virtue of the present embodiment, it is possible tomodify and apply a detection area set in a single image to anappropriate detection area in accordance with an image size in relationto another image.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

Note, the foregoing embodiments merely illustrate embodying examples ofimplementing the present invention, and the technical scope of thepresent invention should not be interpreted to be limited thereby. Inother words, the present invention can be implemented in various formswithout deviating from the technical concepts or the main featuresthereof.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2016-016175, filed Jan. 29, 2016, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image processing apparatus, comprising: aprocessor; and a memory storing instructions which, when executed by theprocessor, cause the image processing apparatus to: select a first imagefile from a plurality of image files which are included in a folder, inresponse to a user instruction for designating the folder; cause adisplay unit to display a first captured image, wherein data of thefirst captured image is included in the first image file; set a firstdetection area for detecting a predetermined object in the firstcaptured image, according to designation by a user; and set a seconddetection area for detecting the predetermined object in a secondcaptured image, based on a position of the first detection area in thefirst captured image, a size of the first captured image and a size ofthe second captured image different from the size of the first capturedimage, wherein data of the second captured image is included in a secondimage file which is included in the folder and is different from thefirst image file.
 2. The image processing apparatus according to claim1, wherein the second detection area corresponds to an area where thefirst detection area and an area of the second captured image overlap inthe case of arrangement in which the first captured image in which thefirst detection area is arranged and the second captured image aresuperimposed aligning predetermined vertices.
 3. The image processingapparatus according to claim 1, wherein in setting the second detectionarea, the instructions, when executed by the processor, cause the imageprocessing apparatus to set, as the second detection area, an areaobtained by modifying the first detection area such that a relationshipof a position and a size of the first detection area in relation to thefirst captured image is the same in the second captured image.
 4. Theimage processing apparatus according to claim 1, wherein the first imagefile includes at least the data of the first captured image and thesecond image file includes at least the data of the second capturedimage, the first captured image and the second captured image beingcaptured by a camera at partially or a same angle of view.
 5. The imageprocessing apparatus according to claim 1, wherein at least one of thefirst image file or the second image file satisfies at least one of: thefirst image file includes data of a plurality of captured imagesincluding the first captured image or the second image file includesdata of a plurality of images including the second captured image. 6.The image processing apparatus according to claim 1, wherein theinstructions, when executed by the processor, further cause the imageprocessing apparatus to output information indicating a result ofdetecting the predetermined object in the first detection area in thefirst captured image and information indicating a result of detectingthe predetermined object in the second detection area in the secondcaptured image.
 7. The image processing apparatus according to claim 6,wherein in a case where the second image file includes data of aplurality of images including the second captured image: the outputtingincludes outputting a result of detecting the predetermined object inthe second detection area in relation to the plurality of images.
 8. Theimage processing apparatus according to claim 6, wherein theinstructions, when executed by the processor, further cause the imageprocessing apparatus to make a file name of the result be a file namethat includes a number for which a video frame rate number is added inorder.
 9. The image processing apparatus according to claim 1, whereinthe predetermined object includes one of a person, an object, a symbol,or a character.
 10. An image processing method, comprising: selecting afirst image file from a plurality of image files which are included in afolder, in response to a user instruction for designating the folder;causing a display unit to display a first captured image, wherein dataof the first captured image is included in the first image file; settinga first detection area for detecting a predetermined object, in thefirst captured image according to designation by a user; and setting asecond detection area for detecting the predetermined object in a secondcaptured image, based on a position of the first detection area in thefirst captured image, a size of the first captured image and a size ofthe second captured image different from the size of the first capturedimage, wherein data of the second captured image is included in a secondimage file which is included in the folder and is different from thefirst image file.
 11. A non-transitory computer readable medium storinga computer-executable program for causing a computer to perform an imageprocessing method, the method comprising: selecting a first image filefrom a plurality of image files which are included in a folder, inresponse to a user instruction for designating the folder; causing adisplay unit to display a first captured image, wherein data of thefirst captured image is included in the first image file; setting afirst detection area for detecting a predetermined object in the firstcaptured image, according to designation by a user; and setting a seconddetection area for detecting the predetermined object in a secondcaptured image, based on a position of the first detection area in thefirst captured image, a size of the first captured image and a size ofthe second captured image different from the size of the first capturedimage, wherein data of the second captured image is included in a secondimage file which is included in the folder and is different from thefirst image file.
 12. The image processing method according to claim 10,wherein the second detection area corresponds to an area where the firstdetection area and an area of the second captured image overlap in thecase of arrangement in which the first captured image in which the firstdetection area is arranged and the second captured image aresuperimposed aligning predetermined vertices.
 13. The non-transitorycomputer readable medium according to claim 11, wherein the seconddetection area corresponds to an area where the first detection area andan area of the second captured image overlap in the case of arrangementin which the first captured image in which the first detection area isarranged and the second captured image are superimposed aligningpredetermined vertices.
 14. The image processing apparatus according toclaim 1, wherein the instructions, when executed by the processor,further cause the image processing apparatus to detect the predeterminedobject in the first detection area in the first captured image anddetect the predetermined object in the second detection area in thesecond captured image.
 15. The image processing apparatus according toclaim 1, wherein a file which is positioned at a head is selected as thefirst captured image in a case where file names of the plurality ofimage files are sorted.